@echo off
echo ========================================
echo Django Hotel Management System
echo Database Migration Script
echo ========================================
echo.

echo Step 1: Creating migrations...
python manage.py makemigrations
if %errorlevel% neq 0 (
    echo Error: Failed to create migrations
    pause
    exit /b %errorlevel%
)
echo.

echo Step 2: Applying migrations...
python manage.py migrate
if %errorlevel% neq 0 (
    echo Error: Failed to apply migrations
    pause
    exit /b %errorlevel%
)
echo.

echo ========================================
echo Migration completed successfully!
echo ========================================
echo.
echo Next steps:
echo 1. Create superuser: python manage.py createsuperuser
echo 2. Run server: python manage.py runserver 9000
echo.
pause
